package com.sctvcloud.dongqu.ui.adapter.holder;

import android.content.Context;
import android.content.Intent;
import android.graphics.Typeface;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.style.StyleSpan;
import android.view.View;
import android.widget.ImageView;

import com.ruihang.generalibrary.ui.widget.CustomFontTextView;
import com.sctvcloud.dongqu.R;
import com.sctvcloud.dongqu.base.BaseActivity;
import com.sctvcloud.dongqu.ui.activities.LivingActivity;
import com.sctvcloud.dongqu.ui.activities.MyMainActivity;
import com.sctvcloud.dongqu.ui.activities.TvActivity;
import com.sctvcloud.dongqu.ui.fragment.HomeFragment;
import com.sctvcloud.dongqu.ui.util.IListShowData;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by rh008 on 2017/7/13.
 */

public class BobaoHolder extends BaseAbsHolder<IListShowData> {

    @BindView(R.id.iv_pic)
    protected ImageView iv_pic;
    private Context context;

    public BobaoHolder(Context context, View itemView) {
        super(context, itemView);
        this.context = context;
    }

    @Override
    protected void initInject() {
        ButterKnife.bind(this, itemView);
    }

    @Override
    public void setData(IListShowData iListShowData) {
        iv_pic.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(context, TvActivity.class);
                intent.putExtra(BaseActivity.EX_URL, HomeFragment.getPlayUrl());
                context.startActivity(intent);
            }
        });
    }
}
